-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[Numpy] Add infra for performing constraint check #17272
Conversation
Could you improve the documentation to clarify how to ensure that the constraint check is executed? |
@leezu Unfortunately, I cannot provide further technical details regarding why this hack could work, cuz I don't have know much knowledge about the computation graph engine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
#16868
To perform constraint check on a tensor, one only need to multiply
npx.constraint_check(condition(tensor), msg)
with the origin tensor. In such way, theconstraint_check
is forced to be evaluated.Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments